Skip to content

fix(doctests): fix 3 doctest failures breaking CI#139

Closed
AdaWorldAPI wants to merge 2 commits into
masterfrom
cursor/fix-doctests-9e6d
Closed

fix(doctests): fix 3 doctest failures breaking CI#139
AdaWorldAPI wants to merge 2 commits into
masterfrom
cursor/fix-doctests-9e6d

Conversation

@AdaWorldAPI
Copy link
Copy Markdown
Owner

@AdaWorldAPI AdaWorldAPI commented May 10, 2026

Problem

CI has 4 failures across jobs:

tests/stable — 3 doctest failures (under RUSTFLAGS="-D warnings")

Doctest Error Fix
crystal_encoder::distill unused import Role Remove from import list
nibble::nibble_propagate_bfs unused import nibble_unpack Remove from import list
udf_kernels::udf_sigma_classify assertion: returns "noise" not "exact" Swap band/threshold args — (100, 1000) not (1000, 100)

nostd/thumbv6m-none-eabi — missing target for pinned toolchain

dtolnay/rust-toolchain@stable installs thumbv6m-none-eabi for whichever stable resolves to, but rust-toolchain.toml overrides cargo to 1.94.1 which doesn't have the target → error[E0463]: can't find crate for core.

Fix: add rustup target add ${{ matrix.target }} so the pinned toolchain gets it too.

Verification

  • RUSTFLAGS="-D warnings" cargo test --doc -p ndarray335 passed, 0 failed, 7 ignored
  • cargo test --lib -p ndarray1776 passed, 0 failed, 36 ignored
Open in Web Open in Cursor 

cursoragent and others added 2 commits May 10, 2026 16:33
1. crystal_encoder::distill — remove unused import `Role`
2. nibble::nibble_propagate_bfs — remove unused import `nibble_unpack`
3. udf_kernels::udf_sigma_classify — swap band/threshold args in
   doctest assertions (distance=100 with threshold=1000 → Foveal,
   not distance=1000 with threshold=100 → Reject)

All 3 fail under CI's RUSTFLAGS="-D warnings". Now: 335 doctests pass,
0 fail, 7 ignored.

Co-authored-by: AdaWorldAPI <AdaWorldAPI@users.noreply.github.com>
dtolnay/rust-toolchain installs the target for the matrix toolchain
(stable), but rust-toolchain.toml overrides cargo to use 1.94.1 which
doesn't have thumbv6m-none-eabi installed. Add explicit rustup target
add to ensure the pinned toolchain has the cross-compile target.

Co-authored-by: AdaWorldAPI <AdaWorldAPI@users.noreply.github.com>
AdaWorldAPI added a commit that referenced this pull request May 13, 2026
…d-nostd

Doctest fixes (from #139) + unblock i686 cross-tests + thumbv6m nostd build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants